#newl set timeformat=-sexagesimal||--set time format--
#newl "#ppthapps\ffmpeg\ffprobe.exe" |-program file-
-i "#item" |--input--
-print_format csv=p=0:e=none |-print_format default |-print_format compact |--p=no section name, e=no quotes, you can also use s=separator char, which cannot be " "--
%timeformat% |--time format, hh:mm:ss.microseconds (sexagesimal), or seconds.microseconds--
-show_entries chapter_tags=title:chapter=start_time,end_time |-show_chapters |-show_format |--choose what to show--
> "#path#name-info-csv%timeformat%.txt" |--output info to file, works with show_xx only|

<comment>
Parse m4b file, and extract chapters info to a text file. (csv format.)

show all:
ffprobe -i D:\book.oga -of csv=p=0:e=none:s="*"  -show_chapters >d:\1.txt

show selected:
ffprobe -i D:\book.oga -of csv=p=0:e=none -sexagesimal -show_entries chapter_tags=title:chapter=start_time,end_time  >d:\1.txt


https://www.ffmpeg.org/ffprobe-all.html#compact_002c-csv
-sexagesimal 
    time format


-print_format, of
    set print format

= after csv is separator, not equal, or assigning. like in lavc options for mencoder.

print_section, p
    Print the section name at the begin of each line if the value is 1, disable it with value set to 0. Default value is 1.
    eg, don't add 'chapter' in front of chapter info line. don't add type in front of section.

escape, e
    Set the escape mode to use, default to "c" ("csv" for the csv writer). 
    none, for none. eg, don't add " around file names. sometimes newline is added, so you might wanna use search and replace.
    see extract audio script for example.

item_sep, s
    Specify the character to use for separating fields in the output line. It must be a single printable character, it is "|" by default ("," for the csv writer).
    cannot be set to " " :(





---

-sections

    Print sections structure and section information, and exit. The output is not meant to be parsed by a machine.
-select_streams stream_specifier

    Select only the streams specified by stream_specifier. This option affects only the options related to streams (e.g. show_streams, show_packets, etc.).

    For example to show only audio streams, you can use the command:

    ffprobe -show_streams -select_streams a INPUT

    To show only video packets belonging to the video stream with index 1:

    ffprobe -show_packets -select_streams v:1 INPUT

-show_data

    Show payload data, as a hexadecimal and ASCII dump. Coupled with -show_packets, it will dump the packets data. Coupled with -show_streams, it will dump the codec extradata.

    The dump is printed as the "data" field. It may contain newlines.
-show_data_hash algorithm

    Show a hash of payload data, for packets with -show_packets and for codec extradata with -show_streams.
-show_error

    Show information about the error found when trying to probe the input.

    The error information is printed within a section with name "ERROR".
-show_format

    Show information about the container format of the input multimedia stream.

    All the container format information is printed within a section with name "FORMAT".
-show_format_entry name

    Like -show_format, but only prints the specified entry of the container format information, rather than all. This option may be given more than once, then all specified entries will be shown.

    This option is deprecated, use show_entries instead.
-show_entries section_entries

    Set list of entries to show.

    Entries are specified according to the following syntax. section_entries contains a list of section entries separated by :. Each section entry is composed by a section name (or unique name), optionally followed by a list of entries local to that section, separated by ,.

    If section name is specified but is followed by no =, all entries are printed to output, together with all the contained sections. Otherwise only the entries specified in the local section entries list are printed. In particular, if = is specified but the list of local entries is empty, then no entries will be shown for that section.

    Note that the order of specification of the local section entries is not honored in the output, and the usual display order will be retained.

    The formal syntax is given by:

    LOCAL_SECTION_ENTRIES ::= SECTION_ENTRY_NAME[,LOCAL_SECTION_ENTRIES]
    SECTION_ENTRY         ::= SECTION_NAME[=[LOCAL_SECTION_ENTRIES]]
    SECTION_ENTRIES       ::= SECTION_ENTRY[:SECTION_ENTRIES]

    For example, to show only the index and type of each stream, and the PTS time, duration time, and stream index of the packets, you can specify the argument:

    packet=pts_time,duration_time,stream_index : stream=index,codec_type

    To show all the entries in the section "format", but only the codec type in the section "stream", specify the argument:

    format : stream=codec_type

    To show all the tags in the stream and format sections:

    stream_tags : format_tags

    To show only the title tag (if available) in the stream sections:

    stream_tags=title

-show_packets

    Show information about each packet contained in the input multimedia stream.

    The information for each single packet is printed within a dedicated section with name "PACKET".
-show_frames

    Show information about each frame and subtitle contained in the input multimedia stream.

    The information for each single frame is printed within a dedicated section with name "FRAME" or "SUBTITLE".
-show_streams

    Show information about each media stream contained in the input multimedia stream.

    Each media stream information is printed within a dedicated section with name "STREAM".
-show_programs

    Show information about programs and their streams contained in the input multimedia stream.

    Each media stream information is printed within a dedicated section with name "PROGRAM_STREAM".
-show_chapters

    Show information about chapters stored in the format.

    Each chapter is printed within a dedicated section with name "CHAPTER".
-count_frames

    Count the number of frames per stream and report it in the corresponding stream section.
-count_packets

    Count the number of packets per stream and report it in the corresponding stream section.
-read_intervals read_intervals

    Read only the specified intervals. read_intervals must be a sequence of interval specifications separated by ",". ffprobe will seek to the interval starting point, and will continue reading from that.

    Each interval is specified by two optional parts, separated by "%".

    The first part specifies the interval start position. It is interpreted as an abolute position, or as a relative offset from the current position if it is preceded by the "+" character. If this first part is not specified, no seeking will be performed when reading this interval.

    The second part specifies the interval end position. It is interpreted as an absolute position, or as a relative offset from the current position if it is preceded by the "+" character. If the offset specification starts with "#", it is interpreted as the number of packets to read (not including the flushing packets) from the interval start. If no second part is specified, the program will read until the end of the input.

    Note that seeking is not accurate, thus the actual interval start point may be different from the specified position. Also, when an interval duration is specified, the absolute end time will be computed by adding the duration to the interval start point found by seeking the file, rather than to the specified start value.

    The formal syntax is given by:

    INTERVAL  ::= [START|+START_OFFSET][%[END|+END_OFFSET]]
    INTERVALS ::= INTERVAL[,INTERVALS]

    A few examples follow.

        Seek to time 10, read packets until 20 seconds after the found seek point, then seek to position 01:30 (1 minute and thirty seconds) and read packets until position 01:45.

        10%+20,01:30%01:45

        Read only 42 packets after seeking to position 01:23:

        01:23%+#42

        Read only the first 20 seconds from the start:

        %+20

        Read from the start until position 02:30:

        %02:30

-show_private_data, -private

    Show private data, that is data depending on the format of the particular shown element. This option is enabled by default, but you may need to disable it for specific uses, for example when creating XSD-compliant XML output.
-show_program_version

    Show information related to program version.

    Version information is printed within a section with name "PROGRAM_VERSION".
-show_library_versions

    Show information related to library versions.

    Version information for each library is printed within a section with name "LIBRARY_VERSION".
-show_versions

    Show information related to program and library versions. This is the equivalent of setting both -show_program_version and -show_library_versions options.
-show_pixel_formats

    Show information about all pixel formats supported by FFmpeg.

    Pixel format information for each format is printed within a section with name "PIXEL_FORMAT".
-bitexact

    Force bitexact output, useful to produce output which is not dependent on the specific build.

